from django.http import HttpResponse
from django.shortcuts import render


def hello(request):
    return HttpResponse("Hello world ! ")


def runoob(request):
    views_list = ["菜鸟教程1", "菜鸟教程2", "菜鸟教程3"]
    views_dict = {"name": "小明", 'age': 22}

    context = {'arg1': 'Hello', 'name': '菜鸟教程',
               'views_list': views_list,
               'views_dict': views_dict,
               'arg2': '{{ 变量名|过滤器：可选参数 }}',
               'include': '{% include "nav.html" %}',
               'zhushi': '{# 这是一个注释 #}'}
    return render(request, 'runoob.html', context)


def body(request):
    context = {}
    return render(request, 'body.html', context)
